﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Smart.Common
{
    public partial class xucBaseBarS : xucBase
    {
        public xucBaseBarS()
        {
            InitializeComponent();
            this.Init();
        }

        public event ButtonClickEventHander AddClick;

        public event ButtonClickEventHander CancleClick;

        public event ButtonClickEventHander ChangeClick;

        public event ButtonClickEventHander ClearClick;

        public event ButtonClickEventHander CloseClick;

        public event ButtonClickEventHander ConstructClick;

        public event ButtonClickEventHander CopyClick;

        public event ButtonClickEventHander DeleteClick;

        public event ButtonClickEventHander DetailClick;

        public event ButtonClickEventHander DetailHistoryClick;

        public event ButtonClickEventHander DetailInventoryClick;

        public event ButtonClickEventHander DetailProductClick;

        public event ButtonClickEventHander DetailViewClick;

        public event ButtonClickEventHander EditClick;

        public event ButtonClickEventHander ExportClick;

        public event ButtonClickEventHander HelpClick;

        public event ButtonClickEventHander HistoryClick;

        public event ButtonClickEventHander ImportClick;

        public event ButtonClickEventHander InventoryClick;

        public event ButtonClickEventHander MirrorClick;

        public event ButtonClickEventHander OptionClick;

        public event ButtonClickEventHander PermisionClick;

        public event ButtonClickEventHander PrintClick;

        public event ButtonClickEventHander ProductDetailClick;

        public event ButtonClickEventHander ReadDataByIdClick;

        public event ButtonClickEventHander ReadDataFromFileClick;

        public event ButtonClickEventHander ReadLayoutClick;

        public event ButtonClickEventHander RefreshClick;

        public event ButtonClickEventHander RestoreDataTempClick;

        public event ButtonClickEventHander SaveClick;

        public event ButtonClickEventHander SaveDataByIdClick;

        public event ButtonClickEventHander SaveDataTempClick;

        public event ButtonClickEventHander SaveDataToFileClick;

        public event ButtonClickEventHander SaveLayoutClick;

        public event ButtonClickEventHander SaveNewClick;

        public event ButtonClickEventHander SearchClick;

        public event ButtonClickEventHander SelectAllClick;

        public event ButtonClickEventHander ViewChangedClick;

        public event ButtonClickEventHander ViewClick;
        private void bbiListType_CheckedChanged(object sender, EventArgs e)
        {
            this.RaiseViewChangedClickEventHander();
        }

        private void bbiListType_KeyDown(object sender, KeyEventArgs e)
        {

        }

        private void bbiMerrial_CheckedChanged(object sender, EventArgs e)
        {
            this.RaiseViewChangedClickEventHander();
        }

        private void dtFrom_KeyDown(object sender, KeyEventArgs e)
        {
            this.RaiseViewClickEventHander();
        }

        public void Init()
        {
            this.ucBar.ViewClick += new ButtonClickEventHander(this.ucToolBar_ViewClick);
            this.ucBar.ExportClick += new ButtonClickEventHander(this.ucToolBar_ExportClick);
            this.ucBar.PrintClick += new ButtonClickEventHander(this.ucToolBar_PrintClick);
            this.ucBar.EditClick += new ButtonClickEventHander(this.ucToolBar_EditClick);
            this.ucBar.DeleteClick += new ButtonClickEventHander(this.ucToolBar_DeleteClick);
            this.ucBar.AddClick += new ButtonClickEventHander(this.ucToolBar_AddClick);
            this.ucBar.DetailClick += new ButtonClickEventHander(this.ucToolBar_DetailClick);
            this.ucBar.DetailViewClick += new ButtonClickEventHander(this.ucToolBar_DetailViewClick);
            this.ucBar.HelpClick += new ButtonClickEventHander(this.ucToolBar_HelpClick);
            this.ucBar.CloseClick += new ButtonClickEventHander(this.ucToolBar_CloseClick);
            this.ucBar.CopyClick += new ButtonClickEventHander(this.ucToolBar_CopyClick);
            this.ucBar.MirrorClick += new ButtonClickEventHander(this.ucToolBar_MirrorClick);
            this.ucBar.ProductDetailClick += new ButtonClickEventHander(this.ucToolBar_ProductDetailClick);
            this.ucBar.OptionClick += new ButtonClickEventHander(this.ucToolBar_OptionClick);
            this.ucBar.InventoryClick += new ButtonClickEventHander(this.ucToolBar_InventoryClick);
            this.ucBar.HistoryClick += new ButtonClickEventHander(this.ucToolBar_HistoryClick);
            this.ucBar.SaveLayoutClick += new ButtonClickEventHander(this.ucToolBar_SaveLayoutClick);
            this.ucBar.ReadLayoutClick += new ButtonClickEventHander(this.ucToolBar_ReadLayoutClick);
            this.ucBar.DetailProductClick += new ButtonClickEventHander(this.ucBar_DetailProductClick);
            this.ucBar.DetailHistoryClick += new ButtonClickEventHander(this.ucBar_DetailHistoryClick);
            this.ucBar.DetailInventoryClick += new ButtonClickEventHander(this.ucBar_DetailInventoryClick);
        }

        private void RaiseAddClickEventHander()
        {
            if (this.AddClick != null)
            {
                this.AddClick(this);
            }
        }

        private void RaiseCancleClickEventHander()
        {
            if (this.CancleClick != null)
            {
                this.CancleClick(this);
            }
        }

        private void RaiseChangeClickEventHander()
        {
            if (this.ChangeClick != null)
            {
                this.ChangeClick(this);
            }
        }

        private void RaiseClearClickEventHander()
        {
            if (this.ClearClick != null)
            {
                this.ClearClick(this);
            }
        }

        private void RaiseCloseClickEventHander()
        {
            if (this.CloseClick != null)
            {
                this.CloseClick(this);
            }
        }

        private void RaiseConstructClickEventHander()
        {
            if (this.ConstructClick != null)
            {
                this.ConstructClick(this);
            }
        }

        private void RaiseCopyClickEventHander()
        {
            if (this.CopyClick != null)
            {
                this.CopyClick(this);
            }
        }

        private void RaiseDeleteClickEventHander()
        {
            if (this.DeleteClick != null)
            {
                this.DeleteClick(this);
            }
        }

        private void RaiseDetailClickEventHander()
        {
            if (this.DetailClick != null)
            {
                this.DetailClick(this);
            }
        }

        protected void RaiseDetailHistoryClickEventHander()
        {
            if (this.DetailHistoryClick != null)
            {
                this.DetailHistoryClick(this);
            }
        }

        protected void RaiseDetailInventoryClickEventHander()
        {
            if (this.DetailInventoryClick != null)
            {
                this.DetailInventoryClick(this);
            }
        }

        protected void RaiseDetailProductClickClickEventHander()
        {
            if (this.DetailProductClick != null)
            {
                this.DetailProductClick(this);
            }
        }

        private void RaiseDetailViewClickEventHander()
        {
            if (this.DetailViewClick != null)
            {
                this.DetailViewClick(this);
            }
        }

        private void RaiseEditClickEventHander()
        {
            if (this.EditClick != null)
            {
                this.EditClick(this);
            }
        }

        private void RaiseExportEventHander()
        {
            if (this.ExportClick != null)
            {
                this.ExportClick(this);
            }
        }

        private void RaiseHelpClickEventHander()
        {
            if (this.HelpClick != null)
            {
                this.HelpClick(this);
            }
        }

        private void RaiseHistoryClickEventHander()
        {
            if (this.HistoryClick != null)
            {
                this.HistoryClick(this);
            }
        }

        private void RaiseImportClickEventHander()
        {
            if (this.ImportClick != null)
            {
                this.ImportClick(this);
            }
        }

        private void RaiseInventoryClickEventHander()
        {
            if (this.InventoryClick != null)
            {
                this.InventoryClick(this);
            }
        }

        private void RaiseMirrorClickEventHander()
        {
            if (this.MirrorClick != null)
            {
                this.MirrorClick(this);
            }
        }

        private void RaiseOptionClickEventHander()
        {
            if (this.OptionClick != null)
            {
                this.OptionClick(this);
            }
        }

        private void RaisePermisionClickEventHander()
        {
            if (this.PermisionClick != null)
            {
                this.PermisionClick(this);
            }
        }

        private void RaisePrintClickEventHander()
        {
            if (this.PrintClick != null)
            {
                this.PrintClick(this);
            }
        }

        private void RaiseProductDetailClickEventHander()
        {
            if (this.ProductDetailClick != null)
            {
                this.ProductDetailClick(this);
            }
        }

        private void RaiseReadDataByIdClickEventHander()
        {
            if (this.ReadDataByIdClick != null)
            {
                this.ReadDataByIdClick(this);
            }
        }

        private void RaiseReadFromFileClickEventHander()
        {
            if (this.ReadDataFromFileClick != null)
            {
                this.ReadDataFromFileClick(this);
            }
        }

        private void RaiseReadLayoutClickEventHander()
        {
            if (this.ReadLayoutClick != null)
            {
                this.ReadLayoutClick(this);
            }
        }

        private void RaiseRefreshClickEventHander()
        {
            if (this.RefreshClick != null)
            {
                this.RefreshClick(this);
            }
        }

        private void RaiseRestoreTempClickEventHander()
        {
            if (this.RestoreDataTempClick != null)
            {
                this.RestoreDataTempClick(this);
            }
        }

        private void RaiseSaveClickEventHander()
        {
            if (this.SaveClick != null)
            {
                this.SaveClick(this);
            }
        }

        private void RaiseSaveDataByIdClickEventHander()
        {
            if (this.SaveDataByIdClick != null)
            {
                this.SaveDataByIdClick(this);
            }
        }

        private void RaiseSaveLayoutClickEventHander()
        {
            if (this.SaveLayoutClick != null)
            {
                this.SaveLayoutClick(this);
            }
        }

        private void RaiseSaveNewClickEventHander()
        {
            if (this.SaveNewClick != null)
            {
                this.SaveNewClick(this);
            }
        }

        private void RaiseSaveTempClickEventHander()
        {
            if (this.SaveDataTempClick != null)
            {
                this.SaveDataTempClick(this);
            }
        }

        private void RaiseSaveToFileClickEventHander()
        {
            if (this.SaveDataToFileClick != null)
            {
                this.SaveDataToFileClick(this);
            }
        }

        private void RaiseSearchClickEventHander()
        {
            if (this.SearchClick != null)
            {
                this.SearchClick(this);
            }
        }

        private void RaiseSelectAllClickEventHander()
        {
            if (this.SelectAllClick != null)
            {
                this.SelectAllClick(this);
            }
        }

        private void RaiseViewChangedClickEventHander()
        {
            if (this.ViewChangedClick != null)
            {
                this.ViewChangedClick(this);
            }
        }

        private void RaiseViewClickEventHander()
        {
            if (this.ViewClick != null)
            {
                this.ViewClick(this);
            }
        }

        private void ucBar_DetailHistoryClick(object sender)
        {
            this.RaiseDetailHistoryClickEventHander();
        }

        private void ucBar_DetailInventoryClick(object sender)
        {
            this.RaiseDetailInventoryClickEventHander();
        }

        private void ucBar_DetailProductClick(object sender)
        {
            this.RaiseDetailProductClickClickEventHander();
        }

        private void ucToolBar_AddClick(object sender)
        {
            this.RaiseAddClickEventHander();
        }

        private void ucToolBar_CloseClick(object sender)
        {
            if (base.ParentForm != null)
            {
                base.ParentForm.Close();
            }
        }

        private void ucToolBar_CopyClick(object sender)
        {
            this.RaiseCopyClickEventHander();
        }

        private void ucToolBar_DeleteClick(object sender)
        {
            this.RaiseDeleteClickEventHander();
        }

        private void ucToolBar_DetailClick(object sender)
        {
            this.RaiseDetailClickEventHander();
        }

        private void ucToolBar_DetailViewClick(object sender)
        {
            this.RaiseDetailViewClickEventHander();
        }

        private void ucToolBar_EditClick(object sender)
        {
            this.RaiseEditClickEventHander();
        }

        private void ucToolBar_ExportClick(object sender)
        {
            this.RaiseExportEventHander();
        }

        private void ucToolBar_HelpClick(object sender)
        {
            this.RaiseHelpClickEventHander();
        }

        private void ucToolBar_HistoryClick(object sender)
        {
            this.RaiseHistoryClickEventHander();
        }

        private void ucToolBar_InventoryClick(object sender)
        {
            this.RaiseInventoryClickEventHander();
        }

        private void ucToolBar_MirrorClick(object sender)
        {
            this.RaiseMirrorClickEventHander();
        }

        private void ucToolBar_OptionClick(object sender)
        {
            this.RaiseOptionClickEventHander();
        }

        private void ucToolBar_PrintClick(object sender)
        {
            this.RaisePrintClickEventHander();
        }

        private void ucToolBar_ProductDetailClick(object sender)
        {
            this.RaiseProductDetailClickEventHander();
        }

        private void ucToolBar_ReadLayoutClick(object sender)
        {
            this.RaiseReadLayoutClickEventHander();
        }

        private void ucToolBar_SaveLayoutClick(object sender)
        {
            this.RaiseSaveLayoutClickEventHander();
        }

        private void ucToolBar_ViewClick(object sender)
        {
            this.RaiseViewClickEventHander();
        }

        public xucToolBarL Bar
        {
            get
            {
                return this.ucBar;
            }
            set
            {
                this.ucBar = value;
            }
        }

        public bool Checked
        {
            get
            {
                return this.bbiListType.Checked;
            }
            set
            {
                this.bbiListType.Checked = value;
            }
        }

        public CheckButton Detail
        {
            get
            {
                return this.bbiListType;
            }
            set
            {
                this.bbiListType = value;
            }
        }

        public System.DateTime From
        {
            get
            {
                return this.dtFrom.DateTime;
            }
            set
            {
                this.dtFrom.DateTime = value;
            }
        }

        public bool IsMerrial
        {
            get
            {
                return this.bbiMerrial.Checked;
            }
            set
            {
                this.bbiMerrial.Checked = value;
            }
        }

        public CheckButton Merrial
        {
            get
            {
                return this.bbiMerrial;
            }
            set
            {
                this.bbiMerrial = value;
            }
        }

        public System.DateTime To
        {
            get
            {
                return this.dtTo.DateTime;
            }
            set
            {
                this.dtTo.DateTime = value;
            }
        }
    }
}
